package com.tc.controller;

import com.tc.R;
import com.tc.service.LoginService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: wangyifan
 * @Date: 2022/03/02 14:52
 * @Description: $end$
 * @Version: V1.0
 */
@RestController
@RequestMapping("/tc")
public class LoginController {

    @Autowired(required = false)
    private LoginService loginService;

    @GetMapping("/login")
    public R loginYouPin(@RequestParam("username")String username, @RequestParam("password")String password){

        R r = loginService.login(username,password);

        return r;
    }
}
